using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WebCrawlerTools
{
    public partial class DlgSystem : Form
    {
    
        public DlgSystem()
        {
            InitializeComponent();
        }

        public string DataPath
        {
            get
            {
                return txt_path.Text;
            }
            set
            {
                txt_path.Text = value;
            }
        }

        private void btn_path_select_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(txt_path.Text))
            {
                fbd_path_select.SelectedPath = txt_path.Text;
            }
            if (fbd_path_select.ShowDialog() == DialogResult.OK)
            {
                txt_path.Text = fbd_path_select.SelectedPath;
            }
        }

        private void btn_ok_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(txt_path.Text))
            {
                DialogResult = DialogResult.OK;                
            }
        }

        private void DlgSystem_Load(object sender, EventArgs e)
        {

        }
    }
}